import React from 'react';
import logo from './logo.svg';
import { Switch, Route, BrowserRouter, RouteComponentProps } from 'react-router-dom'
import { Home, Login, Register, Detail} from './pages'

function App() {
  return (
    <div className="App">
      <BrowserRouter>
         <Switch>
            <Route exact path="/" component={Home}></Route>
            <Route path="/login" component={Login}></Route>
            <Route path="/register" component={Register}></Route>
            <Route path="/detail/:id" component={Detail}></Route>
            <Route render={() => <h1>404 not found 页面去火星了 ！</h1>} />
         </Switch>
      </BrowserRouter>
    </div>
  );
}

export default App;
